﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using N2.Web.Mvc;
using N2.Web;
using Dinamico.Models;

namespace Dinamico.Controllers
{
    [Controls(typeof(Models.PartProductGoogleModel))]
    public class PartProductGoogleModelController : ContentController<Models.PartProductGoogleModel>
    {

        public override ActionResult Index()
        {
            //var childens = CurrentItem.Children.Where(x => x.GetContentType().Equals(typeof(PartProductOfferGoogleModel)));

            //CurrentItem.OfferDetails = new List<PartProductOfferGoogleModel>();
            //foreach( var c in childens ){
            
            //    CurrentItem.OfferDetails.Add(c as PartProductOfferGoogleModel);
            //}


  
         //	return PartialView((string)CurrentItem.TemplateKey, CurrentItem);
            return PartialView("PartProductGoogle", CurrentItem);
        }

    }
}
